package com.hjms.account.share;

import com.hjms.account.contracts.dto.account.AddAccountDto;
import com.hjms.account.contracts.vo.account.AccountVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @author 何杨谊
 * @description: 账户服务远程调用接口
 * @date 2022/12/31 21:07
 */
@FeignClient(value = "account-service")
public interface IAccountFeignService {

    /**
     * 创建账户
     * @param dto
     * @return
     */
    @PostMapping("/api/account")
    public String Add(@RequestBody AddAccountDto dto);

    /**
     * 获取账号信息
     * @param accountId
     * @return
     */
    @GetMapping("/api/account/{accountId}")
    public AccountVo Get(@PathVariable(value = "accountId") String accountId);
}
